On OSF, apparently fseek() works in some on-demand way, so the fseek
authorOwen Taylor <otaylor@redhat.com>
Thu, 20 Sep 2001 21:24:19 +0000 (21:24 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 20 Sep 2001 21:24:19 +0000 (21:24 +0000)
Thu Sep 20 17:22:48 2001  Owen Taylor  <otaylor@redhat.com>

* io-tiff.c (gdk_pixbuf__tiff_image_load): On OSF, apparently fseek()
works in some on-demand way, so the fseek gdk_pixbuf_new_from_file() doesn't
work here since we are using the raw file descriptor. So, we call lseek()
on the fileno(f) before using it. (#60840).

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-tiff.c

index d4cae50b5553448f580a902ca6738c7be35bd440..7e08be5036fa03386afae87b4b7b2e61374bc00d 100644 (file)
@@ -1,3 +1,10 @@
+Thu Sep 20 17:22:48 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * io-tiff.c (gdk_pixbuf__tiff_image_load): On OSF, apparently fseek()
+       works in some on-demand way, so the fseek gdk_pixbuf_new_from_file() doesn't 
+       work here since we are using the raw file descriptor. So, we call lseek()
+       on the fileno(f) before using it. (#60840).
+
 2001-09-20  James Henstridge  <james@daa.com.au>
 
        * Makefile.am (gdk-pixbuf-enum-types.c): same change as in pango,
index d8b799344be3fbe49f1282a94ea5754e4571ebec..874a8a73d0728cccda58ed34b63461222caf950b 100644 (file)
@@ -255,6 +255,13 @@ gdk_pixbuf__tiff_image_load (FILE *f, GError **error)
         tiff_push_handlers ();
         
         fd = fileno (f);
+
+        /* On OSF, apparently fseek() works in some on-demand way, so
+         * the fseek gdk_pixbuf_new_from_file() doesn't work here
+         * since we are using the raw file descriptor. So, we call lseek() on the fd
+         * before using it. (#60840)
+         */
+        lseek (fd, 0, SEEK_SET);
         tiff = TIFFFdOpen (fd, "libpixbuf-tiff", "r");
         
         if (!tiff || global_error) {